<layout name="page" />
<block name="content">
	<input type="hidden" id="id" name="id" value="{$vo.id}">
	{:widget('page_header/simple',array('name'=>$vo['name']))}

	<div class="operate-panel">
		<a onclick="go_return_url();" class="btn">返回</a>
		<if condition="$auth->admin ">
			<a onclick="del()"class="btn btn-del">删除</a>
		</if>
		<div class="split"></div>
		<a onclick="winprint()" class="btn  hidden-xs">打印</a>
		<if condition="$auth->write and ($vo.user_id eq $user_id)">
			<a id="btn_edit" class="btn">修改</a>
		</if>
	</div>
	<div class="frame">
		<form method='post' id="frm_content" name="frm_content" enctype="multipart/form-data"  >
			<input type="hidden" id="id" name="id" value="{$vo.id}">
			<div class="frame">
				<div class="box col-12">
					<div class="layui-form-item ">
						<label class="input-label">编号：</label>
						
							<p class="input-static">
								{$vo.doc_no}
							</p>
						</div>
					</div>
				</div>
				<div class="box col-12">
					<div class="layui-form-item ">
						<label class="input-label" >登录日期：</label>
						
							<p class="input-static">
								{$vo.create_time|to_date='Y年m月d日 H:i'}
							</p>
						</div>
					</div>
				</div>
			</div>
			<div class="frame">
				<div class="box col-12">
					<div class="layui-form-item ">
						<label class="input-label" >登录人：</label>
						
							<p class="input-static">
								{$vo.user_name}
							</p>
						</div>
					</div>
				</div>
				<div class="box col-12">
					<div class="layui-form-item ">
						<label class="input-label" >管理员：</label>
						
							<p class="input-static">
								{$admin|show_contact}
							</p>
						</div>
					</div>
				</div>
			</div>

			<div class="frame">
				<div class="box col-12">
					<div class="layui-form-item x-text">
						<label class="input-label" >信息内容：</label>
						
							<div class="content-wrap">
								{$vo.content}
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="frame">
				<div class="box col-12">
					
						<label class="input-label" for="name">附件：</label>
						
							{:widget('file_upload/view',array('add_file'=>$vo['add_file'],'mode'=>'show'))}
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;

			$("#btn_del").on('click', function() {
				layer.msg('确定要删除吗?', {
					time : 0,
					btn : ['确定', '取消'],
					yes : function() {
						var vars = $("#form_data").serialize();
						send_ajax("{:url('del',array('id'=>$vo['id']))}", "", function(data) {
							if (data.status) {
								layer.msg(data.info, function() {
									go_return_url();
								});
							}
						});
					},
					no : function() {
						layer.close();
					}
				});
			});

			$("#btn_edit").on('click', function() {
				window.open(fix_url("{:url('edit')}", {
					"id" : '{$vo.id}'
				}), "_self");
			});
		});

		//增加签收
	</script>
</block>